package com.hp.his.basic.entity;


import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.apache.commons.lang.builder.ToStringBuilder;


/**
 * UPMS Issue
 * 
 * @author Danny
 */
@Entity
@Table(name = "UPMS_ISSUE")
public class UPMSIssue {
	
	private Integer issueId;
	private String createdBy;
	private String categoryId;
	private Date createdDate;
	private String pageId;
	private String issueTitle;
	private String assignee;
	private String priority;
	private String issueStatus;
	private String issueType;
	private String description;
	private String comments;
	private String resolutionType;
	private String resolvedBy;
	private Date resolveDate;
	private String resolution;		
	
	public String getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(String categoryId) {
		this.categoryId = categoryId;
	}

	@Temporal(TemporalType.DATE)
	public Date getCreatedDate() {
		return createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	public String getIssueType() {
		return issueType;
	}

	public void setIssueType(String issueType) {
		this.issueType = issueType;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getComments() {
		return comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}

	public String getResolutionType() {
		return resolutionType;
	}

	public void setResolutionType(String resolutionType) {
		this.resolutionType = resolutionType;
	}

	public String getResolvedBy() {
		return resolvedBy;
	}

	public void setResolvedBy(String resolvedBy) {
		this.resolvedBy = resolvedBy;
	}

	@Temporal(TemporalType.DATE)
	public Date getResolveDate() {
		return resolveDate;
	}

	public void setResolveDate(Date resolveDate) {
		this.resolveDate = resolveDate;
	}

	@Column(name="RESOLUTION", length=2000)
	public String getResolution() {
		return resolution;
	}

	public void setResolution(String resolution) {
		this.resolution = resolution;
	}


	
	@Id
	@Column(name="ISSUEID", nullable = false, unique = true)
	public Integer getIssueId() {
		return issueId;
	}

	public void setIssueId(Integer issueId) {
		this.issueId = issueId;
	}

	@Column(name="CREATEDBY", length=50)
	public String getCreatedBy() {
		return createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy!=null ? createdBy.trim() : createdBy;
	}

	@Column(name="PAGEID", length=10)
	public String getPageId() {
		return pageId;
	}

	public void setPageId(String pageId) {
		this.pageId = pageId!=null ? pageId.trim() : pageId;
	}

	@Column(name="ISSUETITLE", length=500)
	public String getIssueTitle() {
		return issueTitle;
	}

	public void setIssueTitle(String issueTitle) {
		this.issueTitle = issueTitle!=null ? issueTitle.trim() : issueTitle;
	}

	@Column(name="ASSIGNEE", length=50)
	public String getAssignee() {
		return assignee;
	}

	public void setAssignee(String assignee) {
		this.assignee = assignee!=null ? assignee.trim() : assignee;
	}

	@Column(name="PRIORITY", length=10)
	public String getPriority() {
		return priority;
	}

	public void setPriority(String priority) {
		this.priority = priority!=null ? priority.trim() : priority;
	}

	@Column(name="ISSUESTATUS", length=10)
	public String getIssueStatus() {
		return issueStatus;
	}

	public void setIssueStatus(String issueStatus) {
		this.issueStatus = issueStatus!=null ? issueStatus.trim() : issueStatus;
	}
	
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
	
}
